package com.tuanzi.loan.business.repository.sms.custom;

import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.tuanzi.loan.business.entity.sms.SmsSendTaskStatus;
import com.tuanzi.loan.vo.request.family.SmsSendTaskSearchRequest;
import com.tuanzi.loan.vo.response.family.SmsSendTaskSearchResponse;

/**
 * @author Ray 2017/09/21
 */

public interface SmsSendTaskRepositoryCustom {

	Page<SmsSendTaskSearchResponse> list(SmsSendTaskSearchRequest searchRequest, Pageable pageable);
	
	List<String> findDistinctFirstPartyNames();
	
	List<Long> findDistinctCalculateTaskIdByFirstPartyNames(List<String> firstPartyNames);
	
	List<Long> findDistinctCalculateTaskIdByFirstPartyNamesAndExecuteTimeAfter(Date executeDate, List<String> firstPartyNames);
	
	List<Long> findDistinctCalculateTaskIdByStatusAndExecuteTimeAfter(SmsSendTaskStatus status, Date executeDate);

}
